Add test for exact googol (10**100) in intword#304
Add test for exact googol (10**100) in intword#304BlocksecPHD wants to merge 1 commit intopython-humanize:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 11 11
Lines 871 871
=======================================
Hits 867 867
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What do you mean? It has been released: https://pypi.org/project/humanize/4.15.0/ And why does it matter if it's released to PyPI? The tests test the code in this repo. |
|
Hi @hugovk, thank you for pointing that out! You're right - the tests test the code in this repo, not the PyPI package. I've updated the PR description to correct that misleading statement. The test passes on the current repo code (which already has the fix from PR #273), and ensures the googol edge case is covered in the test suite. |
Summary
This PR adds a test case for exact googol (
10**100) inintword()function.Context
intword(10**100)returns the raw number instead of "1.0 googol"intwordand improve performance #273 fixed the underlying issue by usingbisectinstead of for-loop2e100(2 googols) and10**101(10 googols), but not10**100(1 googol)Changes
Added test case
([10**100], "1.0 googol")totests/test_number.pyTesting
The test passes on the current repo code (which already includes the fix from PR #273). This ensures the googol edge case is covered in the test suite for future releases.
Fixes #134